//
//  ViewController.m
//  ZXY_ScrollInfiniteOC
//
//  Created by 宇周 on 15/12/10.
//  Copyright © 2015年 宇周. All rights reserved.
//

#import "ViewController.h"
#import "ZXY_InfinitScroll/ZXY_ScrollPageInfinite.h"
@interface ViewController ()<ZXY_ScrollPageInfiniteDelegate>
@property (weak, nonatomic) IBOutlet ZXY_ScrollPageInfinite *current;
@property (nonatomic , strong)NSArray *dataArr;

@property (weak, nonatomic) IBOutlet UIPageControl *pageControl;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
//    self.dataArr = [[NSMutableArray alloc] init];
//    self.dataArr = @[@"http://www.acourse.net/NFE/files/homework/20151204025958/F3.jpg" ,@"http://www.acourse.net/NFE/files/homework/20151204020844/F9.jpg" ];
    self.dataArr = @[@"http://www.acourse.net/NFE/files/homework/20151204025958/F3.jpg" , @"http://www.acourse.net/NFE/files/homework/20151204021811/F2.jpg" , @"http://www.acourse.net/NFE/files/homework/20151204044405/CMA基础.jpg" , @"http://www.acourse.net/NFE/files/homework/20151204020844/F9.jpg" , @"http://www.acourse.net/NFE/files/homework/20151204020724/P1.jpg" , @"http://www.acourse.net/NFE/files/homework/20151204020958/F8.jpg"];
//    self.dataArr = @[@"1" , @"2" ];
    self.current.placeHolderImg = [UIImage imageNamed:@"1024.png"];
    self.pageControl.numberOfPages = self.dataArr.count;
    self.current.timeInterval = 2;
    [self.current setIMGURL:self.dataArr];
    [self.current startTimer];
    // Do any additional setup after loading the view, typically from a nib.
}

- (void)userClickPageScrollAtIndex:(NSInteger)index
{
    NSLog(@"click %d" , index);
}

- (void)pageChangeCurrentPageAtIndex:(NSInteger)index
{
    self.pageControl.currentPage = index;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
